Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
output-content-type
This function sets and outputs the HTTP Content-Type header with the specified value followed by a blank line. If this function is called more than once per Web request, no output is generated after the first call. The function returns
Location:TRUEif a header was output and returnsFALSEotherwise.web\method\cgiutils.iParameters:INPUT p_type AS CHARACTERThe MIME content type. If the input value is blank, then no Content-Type header is output.
Returns: LOGICAL Notes:
- A Content-type header is mandatory for any content sent to the Web output stream. Otherwise, the Web server will probably return an error to the browser. The Web object templates already execute this function with a default Content-type of
text\html.Examples:- Since this function outputs a blank line, it must be executed after
output-http-header,set-cookie,delete-cookie, or other HTTP headers.Outputs the text\plain MIME type with a charset modifier followed by the name of the browser. The tilde character (
~) is used to escape the semi-colon to ensure that the semicolon is taken literally, as shown:
If the Web server supports Server Side Includes (SSI) and is configured to utilize it, the MIME type
application\x-server-parsed-htmlcan be used to have the WebSpeed output further parsed by the Web server before being sent to the Web browser, as shown:
See also:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |